﻿// JavaScript Document
$(document).ready(function(){
	var $Bottom1WidthLi = $(".Bottom1Width > ul > li");
	var $BottomLi = $(".BottomLi");
	var BottomBtnShow = false;
	var BottomBtnPlay = true;
	$Bottom1WidthLi.click(function(){
		if(BottomBtnPlay){
			BottomBtnPlay=false;
			var Bottom1ThisLen = $Bottom1WidthLi.index(this);
			$BottomLi.eq(Bottom1ThisLen).siblings().hide().css({height:0});
			if($BottomLi.eq(Bottom1ThisLen).height()>1){
				BottomBtnShow = false;
				$BottomLi.eq(Bottom1ThisLen).animate({height:0},function(){BottomBtnPlay=true;});
				}
			else{
				BottomBtnShow = true;
				$BottomLi.eq(Bottom1ThisLen).animate({height:235},function(){BottomBtnPlay=true;});
				};
			};
		});
	$("html").click(function(){
		if(BottomBtnShow){
			setTimeout(function(){$BottomLi.hide().css({height:0});},200);
			};
		});
	$(".KingLiCont a").click(function(){
		BottomBtnShow = false;
		});
	$(".KingLiBg").click(function(){
		return false;
		});
	});